package com.regent.central.bill.repository.storehouse;

import com.regent.central.bill.core.storehouse.StockChangeSku;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.math.BigDecimal;
import java.util.Map;

public interface StockChangeSkuMapper extends Mapper<StockChangeSku> {

    /**
     * 获取该时间范围内有sku变动的盘点id
     *
     * @param goodsMap
     * @return
     */
    Map<String, Object> selectInventoryId(@Param("goodsMap") Map goodsMap);

    /**
     * 更新调整记录
     *
     * @param skuId
     * @param inventoryId
     * @param stock
     * @return
     */
    void updateChangeNum(@Param("skuId") String skuId, @Param("inventoryId") String inventoryId, @Param("stock") BigDecimal stock, @Param("userId") String userId);

}